Skip to content

add async400 exceptiongroup-invalid-access #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 7, 2025
Merged

Conversation

jakkdl
Copy link
Member

@jakkdl jakkdl commented May 6, 2025

pretty straightforward, bulk of it is in avoiding false alarms

@jakkdl
Copy link
Member Author

jakkdl commented May 6, 2025

hm, in hindsight I maybe should've used TypeTrackerVisitor - but it's a non-trivial rewrite so /shrug

Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one more test as below, then let's go!

Comment on lines 17 to 28
EXCGROUP_ATTRS = (
# from ExceptionGroup
"message",
"exceptions",
"subgroup",
"split",
"derive",
# from BaseException
"args",
"with_traceback",
"add_notes",
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a test that set(dir(ExceptionGroup)).issubset(EXCGROUP_ATTRS), so that if a new method or attribute is added (e.g. by PEP-785 😅) we'll notice as soon as we test on that version of Python, rather than when users complain.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oopie, that caught a typo. Turns out it's add_note and not add_notes ^^;

@jakkdl jakkdl enabled auto-merge (squash) May 7, 2025 10:36
@jakkdl jakkdl merged commit 93913ef into python-trio:main May 7, 2025
9 of 10 checks passed
@jakkdl jakkdl deleted the 4xx branch May 7, 2025 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants